Skip to content

OUTPOST: Print weapon names when keys hit#20

Open
hackerb9 wants to merge 3 commits intodplassgit:trunkfrom
hackerb9:PrettierPrinting
Open

OUTPOST: Print weapon names when keys hit#20
hackerb9 wants to merge 3 commits intodplassgit:trunkfrom
hackerb9:PrettierPrinting

Conversation

@hackerb9
Copy link

@hackerb9 hackerb9 commented Feb 4, 2026

Other changes:

  • Shows ellipsis animation before Missed or Hit.
  • Prints results (miss, hit) on the same line as targeting.
  • Show "Target Destroyed" on last line instead of erasing previous line.
  • Use semicolon after print statements to prevent unintended scrolling.
  • Clear lines using CL$=CHR$(13)+SPACE$(39)+CHR$(13) instead of relying on each print statement to end with the right number of spaces.
  • Update screen after result of user action has been printed, but before the enemy ships have taken their turn.

Other changes:
* Prints results (miss, hit) on the same line as targetting.
* Shows ellipsis animation before Missed or Hit.
* Show "Target Destroyed" on last line instead of erasing previous line.
* Use semicolon after print statements to prevent unintended scrolling.
* Clear lines using CL$=CHR$(13)+SPACE$(39)+CHR$(13) instead of
  relying on each print statement to end with the right number of spaces.
@hackerb9 hackerb9 mentioned this pull request Feb 5, 2026
Copy link
Owner

@dplassgit dplassgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I haven't gotten a chance to patch it and play with this version yet.

6030 IF A$="C" OR A$="c" THEN GOSUB1000: RETURN
6035 IF (A$="S" OR A$="s") AND S>0 THEN ?"SECONDARY BATTERY": A=4: Z=5: GOSUB20: S=S-FA: IF S<0 THEN S=0
6040 IF (A$="T" OR A$="t") AND T>0 THEN ?"TORPEDO": A=9: T=T-1
6060 IF A<3 THEN ?@M1,CL$;"BAD INPUT!";: FORZ=1TO500: NEXT: GOTO6000
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?@M1,CL$"BAD INPUT!"

(no semicolon in the middle, no trailing semicolon) is more canonical and follows the pattern in the rest of the file.

Same comment elsewhere (lines 6100, 6240, etc.)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. Note that the semicolon is not superfluous when printing to the final line of the screen.

2999 REM Move ship positions, test for supply ship, test for die
3000 ?@M1,"ENEMY FIRING & MOVING
3010 ?@M2,SPACE$(39)
3000 ?@M1,CL$;"ENEMY FIRING & MOVING";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since cl$ has two newlines, this may not show up in the right place. How does it look on the machine?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has two carriage returns, which puts the cursor to the beginning of the line without advancing to a new line.

5330 M%(EY(G), EX(G))=48+G-30*(G=5)
5400 RETURN
5999 REM Get input and fire weapon
6000 ?@M1,"WEAPON (M/S/T/C):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The extra spaces after the weapon were to erase whatever might have been left over from "ENEMY FIRING & MOVING". Does it look OK?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because CL$ clears it.

@hackerb9
Copy link
Author

hackerb9 commented Feb 6, 2026

Okay, I've removed all the superfluous end quotation marks and interstitial semicolons. Let me know if this works for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants